//
//  JpDate.h
//  yiyong
//
//  Created by apple on 15/5/30.
//  Copyright (c) 2015年 wangjinping. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface JPDate : NSObject

+(NSDateComponents *) dateComponents:(int) unitFlags withDate:(NSDate* ) date;

+(NSInteger) year:(double) currentMillons;
+(NSInteger) month:(double) currentMillons;
+(NSInteger) day:(double) currentMillons;
+(NSInteger) hour:(double) currentMillons;
+(NSInteger) minute:(double) currentMillons;
+(NSInteger) second:(double) currentMillons;

+(NSInteger) weekday:(double) currentMillons;
+(NSString*) weekday:(double) currentMillons withNumber:(BOOL) isNumber;
+(NSString*) date:(double) currentMillons;
+(NSString*) date:(double) currentMillons withSeparator:(NSString *) separator;
+(NSString*) date:(double) currentMillons withSeparator:(NSString *) separator withTag:(int) tag;

+(NSInteger) Year:(NSDate *) date;
+(NSInteger) Month:(NSDate *) date;
+(NSInteger) Day:(NSDate *) date;
+(NSInteger) Hour:(NSDate *) date;
+(NSInteger) Minute:(NSDate *) date;
+(NSInteger) Second:(NSDate *) date;

+(NSInteger) Weekday:(NSDate *) date;
+(NSString*) Weekday:(NSDate *) date withNumber:(BOOL) isNumber;
+(NSString*) Date:(NSDate *) date;
+(NSString*) Date:(NSDate *) date withSeparator:(NSString *) separator;
+(NSString*) Date:(NSDate *) date withSeparator:(NSString *) separator withTag:(int) tag;

+(NSDate*) TimeZoneChange;
+(long long) currentTimeMillis;
+(long long) timeMillisBeforeSeconds:(long long)seconds;
+(long long) timeMillisAfterSeconds:(long long)seconds;

+(int)getAge:(long long) timeMillion;
+ (NSString*)timeFormatFromSeconds:(NSInteger)seconds;
+ (NSDate *)getNowDateFromDate:(NSDate *)anyDate;
+ (NSString *)dateToString:(long long)time;
+ (NSString *)dateToString:(long long)time withFormat:(NSString *)format;
@end
